package events;

/**
 * Car_Accident is a class that inheirts the event class. This allows for
 * further definition of the unique objects that occur only within the
 * Car_Accident.
 * 
 * @author Team Switchboard Boxcar
 */

public class Car_Accident extends Event {

	private int StartingNeighborhood;
	private int RoadIndex;
	private boolean AccidentType;

	/**
	 * Car_Accident is the basic constructor for the Car_Accident {@link Event}.
	 * This constructor needs to be passed the starting Neighborhood
	 * index, the starting neighborhood's Road index, the time that the
	 * car is scheduled to arrive and the type of accident.
	 * 
	 * @param startingNeighborhood
	 *            The integer value (0 - 3) representing the starting
	 *            neighborhood where the accident occurs.
	 * @param roadIndex
	 *            The integer value (0 - 4) representing the road index inside
	 *            of the starting neighborhood.
	 * @param Time
	 *            The number minutes into the simulation at which the car
	 *            accident occurs.
	 * @param typeAccident
	 *            A true value represents turning an accident occuring, while a
	 *            false value represents an accident being cleaned off the road.
	 */
	public Car_Accident(int startingNeighborhood, int roadIndex, int Time,
			boolean typeAccident) {
		super(1, Time);
		StartingNeighborhood = startingNeighborhood;
		RoadIndex = roadIndex;
		AccidentType = typeAccident;
	}

	/**
	 * GetRoad is a function that returns the road index at which the accident
	 * occurs.
	 * 
	 * @return Returns the integer representing the road index at which the car
	 *         accident occurs.
	 */
	public int GetRoad() 
	{	return RoadIndex;	}

	/**
	 * GetNeighborhood is a function that returns the index for the neighborhood
	 * which is the origin neighborhood of the road on which the accident
	 * occurs.
	 * 
	 * @return Returns the integer representing the starting neighborhood for
	 *         the car accident.
	 */
	public int GetNeighborhood() 
	{	return StartingNeighborhood;}

	/**
	 * GetAccident is a function that returns the type of accident that is being
	 * proccessed.
	 * 
	 * @return A boolean value representing whether the accident is beginning or
	 *         ending. <br>
	 *         True = Accident Is Turned On <br>
	 *         False = Accident Is Turned Off
	 */
	public boolean IsAccident() 
	{	return AccidentType;	}

}